package com.zmn.oms.persistence.interfaces.redistribute;
import com.zmn.oms.common.dio.redistribute.OrderWorkRedistributeApplyQuery;
import com.zmn.oms.model.entity.redistribute.OrderWorkRedistributeApply;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OrderWorkRedistributeApplyDao {

    OrderWorkRedistributeApply selectByPrimaryKey(Long redistributeId);

    List<OrderWorkRedistributeApply> listByQuery(OrderWorkRedistributeApplyQuery query);

    List<OrderWorkRedistributeApply> listByOrderIdListAndRedistributeStatus(@Param("orderIdList") List<Long> orderIdList, @Param("redistributeStatus") Integer redistributeStatus);

    List<OrderWorkRedistributeApply> listApplyForEngineerManager(OrderWorkRedistributeApplyQuery query);

    int countByQuery(OrderWorkRedistributeApplyQuery query);

    int countByQueryForEngineerManager(OrderWorkRedistributeApplyQuery query);

    int deleteByPrimaryKey(Long redistributeId);

    int insert(OrderWorkRedistributeApply record);

    int insertSelective(OrderWorkRedistributeApply record);

    int updateByPrimaryKeySelective(OrderWorkRedistributeApply record);

    int updateByPrimaryKey(OrderWorkRedistributeApply record);

    OrderWorkRedistributeApply selectByOrderIdAndWorkIdAndRedistributeStatus(@Param("orderId") Long orderId, @Param("workId") Long workId, @Param("redistributeStatus") Integer redistributeStatus);
}